﻿@model IEnumerable<KRM.Core.KRMSTKSP_getCustomersWaitingForParts_Result>
<div class="fieldset">
    <div class="legend">
        <span>Back Orderred Parts</span>
        <div class="row-fluid">
            <div class="span12">
                <div style="text-align: right">
                <button type="button" class="btn" onclick="$('#viewbackorderedparts').removeClass('IsLoaded'); $('#tabviewbackorderedparts').click();"><i class="icon-refresh"></i></button>
                <a class="btn" style="padding: 0; max-height: 30px;" onclick="ExportCSVWithHead($('#tb-backorderpart'),'BackOrderredParts.csv',$('#tb-backorderpart-head:first'))">
                    <img src="/img/icon-exel.png" style="max-height: 30px">
                </a></div>
                <table class="table table-bordered table-fix krmtable tbl-selected" data-height="250" id="tb-backorderpart">
                    <thead id="tb-backorderpart-head">
                        <tr>
                            <th></th>
                            <th>PartId</th>
                            <th>Part Name</th>
                            <th>Customer Waiting</th>
                            <th>Exact Qty Waiting</th>
                            <th>Expected Arrival Date</th>
                            <th>Quantity</th>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach (var item in Model)
                        {
                            <tr onclick="loadorderwaitingforpart('@item.PartId');" data-partid="@item.PartId">
                                <td>@Html.Raw((item.stockCount!=null && item.stockCount!=-1 )?"<img src='/img/stockimg/canPickWhite.png' style='width: 22px;'/>":"")</td>
                                <td>@item.PartId</td>
                                <td>@item.PartName</td>
                                <td>@item.CustomersWaiting</td>
                                <td>@item.ExactQtyWaiting</td>
                                <td>@item.ExpectedArrivalDate</td>
                                <td>@item.Quantity</td>
                            </tr>
                        }
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<div id="orderwaitingforpartresult" style="margin-top: 30px"></div>
